<dl>
    <% first_attachments = true

       # This 'unless' can be removed if :name is no longer assumed to be a default attribute.
       unless attributes.find {|attr| attr.name == 'name'}
    %><dt>Name:</dt><dd><%%= show :name %></dd><% end %>
    <%- for attribute in attributes -%>
    <%- case attribute.type
        when :attachment -%>
    <dt><%= attribute.name.titleize %>:</dt><dd><%%= link_to "<%= attribute.name.titleize %>", attachment_path_for(@content_block.<%= attribute.name %>) %></dd>
        <%- when :attachments
            if first_attachments
        -%>
    <dt>Attachments:</dt><dd><%%= attachment_viewer @content_block %></dd>
    <%- first_attachments = false
        end -%>
        <%- when :category -%>
    <dt>Category:</dt><dd><%%= @content_block.category_name %></dd>
        <%- else -%>
    <dt><%= attribute.name.titleize %>:</dt><dd><%%= show :<%= attribute.name %> %></dd>
      <%- end -%>
    <% end %>
</dl>